home *** CD-ROM | disk | FTP | other *** search
Wrap
GW-BASIC | 1997-01-29 | 11.1 KB | 380 lines
10 'SHORTANT - Short Off-Centre Loaded Dipole - 25 JAN 94 rev. 30 DEC 96 20 'ref The ARRL ANTENNA ANTHOLOGY, publication no.36, page 107 30 IF EX$=""THEN EX$="EXIT" 40 PROG$="shortant" 50 COMMON EX$,PROG$,U,UH,LX 60 CLS:KEY OFF 70 COLOR 7,0,1 80 DIM GA(40) 'AWG sizes 90 DIM L(9) 100 PI=3.14159 110 UL$=STRING$(80,205) 120 U$="#####.##" 130 V$="#####.###" 140 F$="###.###" 150 G$="####.###" 160 ' 170 '.....AWG sizes 180 K=(0.46/0.005)^(1/39) 'increment multiplier 190 FOR Z=1 TO 40 200 N=Z+3 210 GA(Z)=0.46/K^N 220 NEXT Z 230 ' 240 '.....start 250 CLS 260 COLOR 15,2 270 PRINT " SHORT OFF-CENTRE LOADED DIPOLE"; 280 PRINT TAB(57)"by George Murphy VE3ERP "; 290 COLOR 1,0:PRINT STRING$(80,223); 300 COLOR 7,0 310 IF LX THEN 320 ELSE 350 320 PRINT " The current predetermined data are for an antenna length of" 330 PRINT USING F$;LX*0.3048;:PRINT " m. (";USING F$;LX;:PRINT " ft.)" 340 GOTO 380 350 IF UH=0 AND U<>0 THEN UH=U 360 IF UH THEN 400 'skip preface 370 GOSUB 3510 'preface 380 PRINT UL$; 390 ' 400 PRINT TAB(7); 410 PRINT "To prune an existing antenna you must first RUN a new program" 420 PRINT TAB(7); 430 PRINT "entering the same data used for the design of the existing antenna" 440 PRINT TAB(7); 450 PRINT "to let the computer know what it is you want to prune." 460 PRINT UL$; 470 PRINT " Press number in < > to: 480 PRINT UL$; 490 PRINT " < 1 > RUN new program" 500 IF UH=0 THEN 560 510 PRINT " < 2 > Design an AIR-CORE INDUCTOR for this type of antenna" 520 PRINT " < 3 > SELECT a commercial inductor for this type of antenna" 530 IF F=0 OR NF<>0 THEN 550 540 PRINT " < 4 > PRUNE existing antenna" 550 PRINT UL$; 560 PRINT " < 0 > EXIT" 570 Z$=INKEY$ 580 IF Z$=""THEN 570 590 IF Z$="0"THEN CLS:RUN EX$ 600 IF Z$="1"THEN M=0:UH=0:F=0:D=0:LG=0:BB=0:W=0:DIA=0:GOTO 950 'variables 610 IF Z$="2"THEN CLS:CHAIN"coildsgn" 620 IF Z$="3"THEN U=UH:CLS:CHAIN "aircore" 630 IF F=0 THEN 650 640 IF Z$="4"THEN 670 650 GOTO 570 660 ' 670 '.....prune 680 VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3 690 PRINT " Antenna was designed for a centre frequency of";F;"MHz. 700 PRINT 710 INPUT " ENTER: Frequency (MHz) where minimum SWR occurs";F1 720 LOCATE CSRLIN-1:PRINT STRING$(80,32);:LOCATE CSRLIN-1 730 PRINT " Minimum SWR occurs at..........";USING F$;F1;:PRINT " MHz" 740 DIFF=F1-F 750 PRINT " Offset from design frequency...";USING F$;DIFF;:PRINT " MHz" 760 NF=F-DIFF 770 PRINT " PRUNE frequency................";USING F$;NF;:PRINT " Mhz" 780 PRINT 790 TB=7 800 PRINT TAB(TB); 810 PRINT " Re-designing the antenna for the PRUNE frequency should shift the" 820 PRINT TAB(TB); 830 PRINT " frequency of minimum SWR closer to the original design frequency" 840 PRINT TAB(TB); 850 PRINT " of";F;"MHz." 860 PRINT 870 PRINT TAB(TB); 880 PRINT " Press any key for specifications of re-designed antenna..,,,....." 890 IF INKEY$=""THEN 890 900 F=NF 910 VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3 920 GOTO 1120 930 END 940 ' 950 '.....preamble 960 VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3 970 IF BB THEN 1060 980 PRINT " Press number in < > to choose standard units of measure:" 990 PRINT UL$; 1000 PRINT " < 1 > Metric" 1010 PRINT " < 2 > U.S.A./Imperial" 1020 Z$=INKEY$ 1030 IF Z$="1"THEN UM=0.3048:UM$=" m.":GOTO 1060 1040 IF Z$="2"THEN UM=1:UM$=" ft.":GOTO 1060 1050 GOTO 1020 1060 IF M THEN 1120 1070 VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3 1080 GOSUB 2890 'text 1090 GOSUB 3670 'screen dump 1100 PRINT UL$; 1110 ' 1120 '.....diagram 1130 CLS 1140 T=11 'tab 1150 COLOR 0,7 1160 LOCATE,T:PRINT" " 1170 LOCATE,T:PRINT" CALLDEFSNGSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND A SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDDEFDBLCALL " 1180 LOCATE,T:PRINT" CALLDEFSNGSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND A/2 SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDDEFDBLCALLDEFSNGSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND A/2 SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDDEFDBLCALL " 1190 LOCATE,T:PRINT" CALLDEFSNGSOUNDSOUNDSOUND C SOUNDSOUNDSOUNDDEFDBLCALLDEFSNGSOUNDSOUNDSOUNDSOUNDSOUND B SOUNDSOUNDSOUNDSOUNDSOUNDDEFDBLCALLDEFSNGSOUNDSOUNDSOUNDSOUNDSOUND B SOUNDSOUNDSOUNDSOUNDSOUNDDEFDBLCALLDEFSNGSOUNDSOUNDSOUND C SOUNDSOUNDSOUNDDEFDBLCALL " 1200 LOCATE,T:PRINT" CALL CALL " 1210 LOCATE,T:PRINT" /SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDORORORORORSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDBSAVE/BSAVESOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDORORORORORSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND/ " 1220 LOCATE,T:PRINT" L PRESETSOUND' L " 1230 LOCATE,T:PRINT" loading coil 50 -OPEN COAX loading coil " 1240 COLOR 7,0 1250 PRINT UL$; 1260 ' 1270 '.....input parameters 1280 IF F THEN 1310 1290 INPUT" ENTER: Centre frequency (in MHz) of the band you want to operate ";F 1300 IF F=0 THEN LOCATE CSRLIN-1:GOTO 1290 1310 SP=300/F*0.656*UM 1320 VIEW PRINT 10 TO 24:CLS:VIEW PRINT:LOCATE 10 1330 PRINT " For maximum efficiency at";F;"MHz, dimension A should be at least"; 1340 PRINT INT(SP*100)/100;UM$ 1350 PRINT " Shorter antennas will also work, but at reduced efficiency." 1360 PRINT UL$; 1370 IF LG=0 AND LX<>0 THEN LG=LX 'if lgth chained from SHORTDIP 1380 IF LG THEN 1420 1390 PRINT " ENTER: Length (";UM$;")..........................A= ";:INPUT LG 1400 LG=LG/UM 1410 IF LG=0 THEN LOCATE CSRLIN-1:GOTO 1390 1420 IF DIA THEN 1590 1430 VIEW PRINT 10 TO 24:CLS:VIEW PRINT:LOCATE 10 1440 PRINT " Press letter in < > to select conductor size:" 1450 PRINT UL$; 1460 PRINT " < a > Diameter in millimetres" 1470 PRINT " < b > Diameter in inches" 1480 PRINT " < c > AWG#" 1490 Z$=INKEY$ 1500 IF Z$="a"OR Z$="A"THEN WS$="mm":GOTO 1540 1510 IF Z$="b"OR Z$="B"THEN WS$="inches":GOTO 1540 1520 IF Z$="c"OR Z$="C"THEN WS$="AWG#":GOTO 1540 1530 GOTO 1490 1540 PRINT " ENTER: Wire size (";WS$;")";:INPUT ZD 1550 IF WS$="mm"THEN DIA=ZD/25.4 1560 IF WS$="inches"THEN DIA=ZD 1570 IF WS$="AWG#"THEN DIA=GA(ZD) 1580 ' 1590 '.....display data 1600 VIEW PRINT 10 TO 24:CLS:VIEW PRINT 1610 COLOR 0,7 1620 IF UM=1 THEN 1630 ELSE 1680 1630 X=LG:GOSUB 2780:LOCATE 2,36:PRINT X$;" " 1640 X=LG/2:GOSUB 2780:LOCATE 3,21:PRINT X$;" " 1650 LOCATE 3,50:PRINT X$;" " 1660 GOTO 1720 1670 ' 1680 LOCATE 2,40:PRINT USING F$;LG*0.3048;:PRINT " m. " 1690 LOCATE 3,20:PRINT USING F$;LG/2*0.3048;:PRINT " m. " 1700 LOCATE 3,51:PRINT USING F$;LG/2*0.3048;:PRINT " m. " 1710 ' 1720 COLOR 7,0 1730 LOCATE 9:PRINT STRING$(80,32); 1740 PRINT " TYPICAL";F;"MHz "; 1750 Y$=WS$ 1760 IF WS$="inches"THEN Y$=CHR$(34) 1770 IF WS$="AWG#"THEN Y$=CHR$(34) 1780 Y=DIA:IF Y$="mm"THEN Y=Y*25.4 1790 PRINT "SHORT DIPOLE ANTENNA USING";USING "##.###";Y; 1800 PRINT Y$;" WIRE."; 1810 IF WS$="AWG#"THEN PRINT " ( ";WS$;ZD;")"ELSE PRINT "" 1820 PRINT UL$; 1830 W=ZD 'AWG # for chaining to coil designer program 1840 ' 1850 '.....calculate and print 1860 F1=10^6/(68*PI^2*F^2) 1870 IF BB=0 THEN 1920 1880 Z=0 1890 B=BB 1900 GOTO 1940 1910 ' 1920 FOR Z=1 TO 9 '*************************START LOOP************************ 1930 B=Z*0.1*LG/2 1940 F2=LOG((24*(234/F)-B)/DIA-1) 1950 F3=(1-F*B/234)^2-1 1960 F4=234/F-B 1970 F5=LOG((24*LG/2-B)/DIA-1) 1980 F6=((F*LG/2-F*B)/234)^2-1 1990 F7=LG/2-B 2000 L(Z)=F1*(F2*F3/F4-F5*F6/F7) 2010 IF L(Z)>0 THEN 2260 2020 ' 2030 BEEP:VIEW PRINT 10 TO 24:CLS:VIEW PRINT:LOCATE 10 2040 PRINT UL$; 2050 PRINT " Available space is ample for a full size half-wave"; 2060 PRINT F;"MHz Dipole, which is" 2070 WL=492/F '1/2 wavelength in free space, in feet 2080 RA=WL*12/DIA 'ratio of 1/2 wavelength to wire diameter 2090 K=0.91 2100 IF RA>10 THEN K=0.92 2110 IF RA>12 THEN K=0.93 2120 IF RA>15 THEN K=0.94 2130 IF RA>22 THEN K=0.95 2140 IF RA>50 THEN K=0.96 2150 IF RA>200 THEN K=0.97 2160 IF RA>2000 THEN K=0.98 2170 HW=492*K/F 'length of half wave flat top, in feet 2180 HW=0.95*HW/K 'end effect correction for F<30MHz 2190 IF UM=1 THEN X=HW:GOSUB 2780:PRINT X$;" long":GOTO 2210 2200 IF UM<>1 THEN X=HW*0.3048:X=INT(X*100+0.5)/100:PRINT X;"m. long" 2210 PRINT UL$; 2220 GOSUB 3670 2230 GOTO 240 2240 END 2250 ' 2260 '.....calculate lengths 2270 IF UM=1 THEN X=B:GOSUB 2780:PRINT "<";Z;"> B=";X$; 2280 IF UM<>1 THEN PRINT "<";Z;"> B=";USING F$;B*0.3048;:PRINT" m."; 2290 IF UM=1 THEN X=LG/2-B:GOSUB 2780:PRINT TAB(24);"C=";X$; 2300 IF UM<>1 THEN X=LG/2-B:PRINT TAB(24);"C=";USING F$;X*0.3048;:PRINT" m."; 2310 PRINT TAB(40);"Inductors L=";USING F$;L(Z);:PRINT " >H"; 2320 IF Z=1 THEN PRINT TAB(65);"Least Efficient"; 2330 IF Z=5 THEN PRINT TAB(65);"( B = C )"; 2340 IF Z=9 THEN PRINT TAB(65);"Most Efficient"; 2350 IF Z<10 THEN PRINT "" 2360 IF BB THEN Z=0:GOTO 2410 2370 NEXT Z '**************************END LOOP************************* 2380 GOTO 2410 2390 ' 2400 UH=L(Z):GOSUB 3670 2410 COLOR 0,7:LOCATE 23,8 2420 PRINT " Do you want to calculate other B & C dimensions? (y/n) " 2430 COLOR 7,0 2440 Z$=INKEY$:IF Z$=""THEN 2440 2450 IF Z$="n"THEN LOCATE 23:PRINT STRING$(80,32);:LOCATE 23:GOTO 2630 2460 IF Z$="y"THEN LOCATE 23:PRINT STRING$(80,32);:LOCATE 23:GOTO 2500 2470 GOTO 2440 2480 COLOR 7,0 2490 ' 2500 '.....alternate B & C dimensions 2510 LOCATE 23 2520 PRINT " ENTER: Desired dimension B (in ";UM$;")....B= ";:INPUT B 2530 B=B/UM 2540 LOCATE CSRLIN-1:PRINT STRING$(80,32); 2550 J=LG/UM/2 2560 IF B=<J THEN LOCATE 22:GOTO 2610 2570 BEEP:LOCATE 23:PRINT STRING$(80,32);:LOCATE 22:COLOR 0,7 2580 PRINT " Dimension B must be less than";J;UM$;"....PRESS ANY KEY...." 2590 IF INKEY$=""THEN 2590 2600 COLOR 7,0:LOCATE CSRLIN-1:PRINT STRING$(80,32);:GOTO 2510 2610 Z=0:BB=B:GOTO 1940 2620 ' 2630 '.....end 2640 IF NF THEN LOCATE 12:PRINT " ":GOSUB 3670:GOTO 2720 2650 GOSUB 3670 'screen dump 2660 LOCATE 25,1:PRINT STRING$(80,32); 2670 LOCATE 23,8:COLOR 0,7 2680 PRINT " Press a number in < > above to select your choice of antenna..." 2690 COLOR 7,0 2700 Z$=INKEY$:IF Z$=""THEN 2700 2710 IF VAL(Z$)<0 OR VAL(Z$)>9 THEN 2700 2720 UH=L(VAL(Z$)) 2730 IF Z$="0"THEN 2750 2740 BB=VAL(Z$)*0.1*LG/2 2750 CLS:GOTO 240 2760 END 2770 ' 2780 '.....convert to feet and inches 2790 FT=INT(X) 2800 IN=(X-FT)*12 2810 IF IN>=12 THEN IN=IN-12:FT=FT+1 2820 FT$=STR$(FT) 2830 IF LEN(FT$)<3 THEN FT$=" "+FT$:GOTO 2830 2840 IN$=STR$(IN) 2850 IF INT(IN)>9 THEN IN$=LEFT$(IN$,5)ELSE IN$=LEFT$(IN$,4) 2860 X$=FT$+"'-"+IN$+CHR$(34) 2870 RETURN 2880 ' 2890 '.....text block 2900 TB=7 'tab for text 2910 PRINT TAB(TB); 2920 PRINT " This antenna is a dipole with lumped-constant loading. At modest" 2930 PRINT TAB(TB); 2940 PRINT "heights (10-30 metres) it will work well if its physical length is" 2950 PRINT TAB(TB); 2960 PRINT "longer than 0.2 x wavelength. This threshold length is displayed" 2970 PRINT TAB(TB); 2980 PRINT "early in the program. Shorter lengths will be less efficient." 2990 PRINT TAB(TB); 3000 PRINT " The antenna can be fed directly with 50- coaxial line. The design" 3010 PRINT TAB(TB); 3020 PRINT "is based on the concept of inductive loading, widely used in centre" 3030 PRINT TAB(TB); 3040 PRINT "loaded mobile whip antennas." 3050 PRINT TAB(TB); 3060 PRINT " For maximum efficiency the antenna should be as long as possible," 3070 PRINT TAB(TB); 3080 PRINT "consistent with available space. The loading coils should be as far" 3090 PRINT TAB(TB); 3100 PRINT "from the centre feed point as possible, bearing in mind that the" 3110 PRINT TAB(TB); 3120 PRINT "farther the coils are from the feed point the larger they become." 3130 PRINT TAB(TB); 3140 PRINT " The program calculates 9 different combinations of inductor size" 3150 PRINT TAB(TB); 3160 PRINT "and location. You can specify an additional location if you wish." 3170 PRINT TAB(TB); 3180 PRINT " For maximum efficiency select the combination using the largest" 3190 PRINT TAB(TB); 3200 PRINT "inductor that is practical for your application. When you select" 3210 PRINT TAB(TB); 3220 PRINT "one of the options you will be given the option of selecting a" 3230 PRINT TAB(TB); 3240 PRINT "commercial coil of the inductance required or designing your own." 3250 PRINT TAB(TB); 3260 PRINT "For an acceptable Q use a coil whose length does not exceed twice" 3270 PRINT TAB(TB); 3280 PRINT "its diameter." 3290 PRINT TAB(TB); 3300 PRINT " Make printouts of each screen display as you are designing your" 3310 PRINT TAB(TB); 3320 PRINT "antenna for later use when testing and pruning."; 3330 GOSUB 3670 3340 CLS 3350 PRINT TAB(TB); 3360 PRINT " Pruning is accomplished by adjusting the number of turns on the" 3370 PRINT TAB(TB); 3380 PRINT "loading coils. All you have to do is determine the frequency where" 3390 PRINT TAB(TB); 3400 PRINT "the SWR is lowest. Run the program again, using the original data," 3410 PRINT TAB(TB); 3420 PRINT "except you re-design the antenna for the PRUNE frequency, which the" 3430 PRINT TAB(TB); 3440 PRINT "program provided when you selected the PRUNE option from the menu." 3450 PRINT TAB(TB); 3460 PRINT " What the PRUNE option does is shift the design centre frequency" 3470 PRINT TAB(TB); 3480 PRINT "from where it ended up to where you wanted it in the first place." 3490 RETURN 3500 ' 3510 '.....preface 3520 OPEN"I",1,"\data\docfiles\antenna.doc" 3530 IF EOF(1)THEN 3550 3540 INPUT#1,NOTE$:PRINT " ";NOTE$:GOTO 3530 3550 CLOSE:PRINT UL$; 3560 T=7 3570 PRINT TAB(T); 3580 PRINT "This electrically shortened dipole is similar in appearance to a" 3590 PRINT TAB(T); 3600 PRINT "trap dipole except the `traps' consist of coils only, causing the" 3610 PRINT TAB(T); 3620 PRINT "antenna to operate not unlike two mobile inductively loaded whips" 3630 PRINT TAB(T); 3640 PRINT "mounted horizontally, base-to-base." 3650 RETURN 3660 ' 3670 'HARDCOPY 3680 GOSUB 3790:LOCATE 25,2:COLOR 14,6 3690 PRINT " Press 1 to print screen, 2 to print screen & "; 3700 PRINT "advance paper, or 3 to continue.";:COLOR 7,0 3710 Z$=INKEY$:IF Z$="3"THEN GOSUB 3790:RETURN 3720 IF Z$="1"OR Z$="2"THEN GOSUB 3790:GOTO 3740 3730 GOTO 3710 3740 FOR QX=1 TO 24:FOR QY=1 TO 80 3750 LPRINT CHR$(SCREEN(QX,QY)); 3760 NEXT QY:NEXT QX 3770 IF Z$="2"THEN LPRINT CHR$(12) 3780 GOTO 3680 3790 LOCATE 25,1:PRINT STRING$(80,32);:RETURN